package cn.edu.sjtu.se.dslab.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.sjtu.se.dslab.component.data.UploadFile;
import cn.edu.sjtu.se.dslab.dao.IUploadFileDao;
import cn.edu.sjtu.se.dslab.service.IUploadFileService;
@Service("uploadFileService")
@Transactional
public class UploadFileServiceImpl implements IUploadFileService {
	@Resource(name = "uploadFileDao")
	private IUploadFileDao uploadFileDao;
	@Override
	public void saveUploadFile(UploadFile file) {
		// TODO Auto-generated method stub
		uploadFileDao.save(file);
	}

	@Override
	public List<UploadFile> getUploadFilesByName(String name) {
		// TODO Auto-generated method stub
		return uploadFileDao.queryByName(name);
	}

	@Override
	public UploadFile getUploadFileByUri(String uri) {
		// TODO Auto-generated method stub
		return uploadFileDao.queryByUri(uri);
	}

}
